#include "SFMLMusic.h"

using namespace vn;

SFMLMusic::SFMLMusic(void)
{
}


SFMLMusic::~SFMLMusic(void)
{
}

void SFMLMusic::setMusicFile(const std::string& p_filepath)
{
	m_music.openFromFile(p_filepath);
}

void SFMLMusic::play()
{
	m_music.play();
}

void SFMLMusic::pause()
{
	m_music.pause();
}

void SFMLMusic::stop()
{
	m_music.stop();
}

void SFMLMusic::setLoop(bool p_value)
{
	m_music.setLoop(p_value);
}

void SFMLMusic::setVolume(float p_volume)
{
	m_music.setVolume(p_volume);
}

void SFMLMusic::setPitch(float p_pitch)
{
	m_music.setPitch(p_pitch);
}

bool SFMLMusic::getLoop()
{
	return m_music.getLoop();
}

float SFMLMusic::getVolume()
{
	return m_music.getVolume();
}

float SFMLMusic::getPitch()
{
	return m_music.getPitch();
}


vn::AudioState SFMLMusic::getAudioState()
{
	sf::Sound::Status status = m_music.getStatus();
	vn::AudioState state = static_cast<vn::AudioState>(status);
	return state;
}

